
#-----------------------------------------------------------------

# open tag
def otag(t, list=[]): # list of (key,value) pairs
    s = '<' + t;
    for key,value in list:
        s += ' ' + str(key) + '=\"' + str(value) + '\"'
    s += '>'
    return s

# open-close tag (singleton tag)
def octag(t, list=[]):
    s = '<' + t;
    for key,value in list:
        s += ' ' + str(key) + '=\"' + str(value) + '\"'
    s += '/>'
    return s

# close tag
def ctag(t) : 
    return '</' + t + '>'

